#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :primeNumber.py
# @Time      :2020/6/22 11:21
# @Author    :Administrator

import math;

while True:

    input_number = int(input('请输入一个数字：'))

    if input_number > 1:
        for x in range(2, math.floor(math.sqrt(input_number)) + 1):
            if (input_number % x == 0):
                print(input_number, '是合数')
                print(x, '乘以', input_number // x, '是', input_number)
                break
        else:
            print(input_number, '是质数')
    else:
        print(input_number, '既不是质数，也不是合数')
